package service

import (
	"GoMaestro/internal/entity"
	"GoMaestro/internal/entity/app"
	"github.com/gin-gonic/gin"
)

type JenService interface {
	GetNodeStatus() (*entity.JenNodes, error)
	GetBuildStatus(string, int) (interface{}, error)
	GetJobLog(job string, s1 int64, s2 ...string) (interface{}, error)
	GetStreamLog(c *gin.Context, job string, s1 int64, logChan chan string, errChan chan error, s2 ...string)
	CreateTask(string, map[string]string) (int64, string, error)
}

// PubService 发布服务接口，不同规范的发布流程需要实现如下的接口，在方法中组合运行参数、环境参数、用户请求等
type PubService interface {
	Publishing(int, bool, ...string) (int, *app.App, error)
	GoStrategy(a *app.App, jobName string, params ...string) error
}
